import api from '../index'

export default {
  // 登录
  login: (data: {
    username: string
    password: string
    // "username": "agent002",
    // "password": "Agent123456",
    // "login_type": "pwd_login",
    // "mobile": "13800138002",
    // "sms_code":"660893"
  }) => api.post('agent/user/login', {
    ...data,
    mobile: '15610740121',
    login_type: 'pwd_login',
  }, {
    // baseURL: '/mock/',
  }),

  // 获取权限
  permission: () => api.get('user/permission', {
    // baseURL: '/mock/',
  }),

  // 修改密码
  passwordEdit: (data: {
    password: string
    newPassword: string
  }) => api.post('user/password/edit', data, {
    // baseURL: '/mock/',
  }),
}
